{include file="header.tpl" logged_in=$logged_in title="Diskusjon" CONFIG=$CONFIG}
{include file="discussion_header.tpl" this='overview'}


{foreach from=$detailed_threads item=thread}
<div id="thread" style="margin-top : 0.5em; 
    border-left : 1px solid; 
    border-top : 1px solid; border-bottom : 1px solid;">
	
	<div>
	<h2 style="margin-bottom : 0px; background-color : #FFFAF4; width : 50%;">
		<img src="graphic/32x32/agt_family.png" alt="" 
                    style="margin-right : 0.5em;" /> 	
		<a href="discussion.php?view=thread&t={$thread.id}">{$thread.title}</a>
                <small>({$thread.postcount})</small>

	</h2>
	</div>


	<div style="margin-left : 2em;">
	<h3><small>{$thread.first_post.user} den {$thread.first_post.date|date_format:"%d/%m/%Y"}</small></h3>
	<div>{$thread.first_post.text|strip_tags|markdown|nl2br}</div>
	
	{if $thread.last_post}
		<h3>Siste svar<small> av {$thread.last_post.user} den {$thread.last_post.date|date_format:"%d/%m/%Y"}</small></h3>
		<div>{$thread.last_post.text|strip_tags|markdown|nl2br}</div>
	{/if}

	</div>
</div>
{foreachelse}
    <p>Ingenting har vært diskutert.</p>
{/foreach}

<div style="margin-top : 2em;">
<ul style="list-style-type : none; padding : 0; margin : 0;">
{section name=dlist loop=$simple_threads}
	<li style=" margin-top : 0.2em;
			background-color : #FFFAF4">
		<img src="graphic/22x22/agt_family.png" alt="" />
		<a href="discussion.php?view=thread&t={$simple_threads[dlist].id}"> {$simple_threads[dlist].title}</a> 
		<span style="font-size : x-small;">({$simple_threads[dlist].postcount})</span>
	</li>
{/section}
</ul>
</div>

{include file="footer.tpl"}







